<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Favicons --> 
<link rel="shortcut icon" type="image/png" HREF="${ctx}/img/favicons/favicon.png"/>
<link rel="icon" type="image/png" HREF="${ctx}/img/favicons/favicon.png"/>
<link rel="apple-touch-icon" HREF="${ctx}/img/favicons/apple.png" />
<!-- Main Stylesheet --> 
<link rel="stylesheet" href="${ctx}/css/style.css" type="text/css" />
<!-- Colour Schemes
Default colour scheme is blue. Uncomment prefered stylesheet to use it.
<link rel="stylesheet" href="css/brown.css" type="text/css" media="screen" />  
<link rel="stylesheet" href="css/gray.css" type="text/css" media="screen" />  
<link rel="stylesheet" href="css/green.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/pink.css" type="text/css" media="screen" />  
<link rel="stylesheet" href="css/red.css" type="text/css" media="screen" />
-->
<!-- Your Custom Stylesheet --> 
<link rel="stylesheet" href="${ctx}/css/custom.css" type="text/css" />
<!--swfobject - needed only if you require <video> tag support for older browsers -->
<script type="text/javascript" SRC="${ctx}/js/swfobject.js"></script>
<!-- jQuery with plugins -->
<script type="text/javascript" SRC="${ctx}/js/jquery-1.4.2.min.js"></script>
<!-- Could be loaded remotely from Google CDN : <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> -->
<script type="text/javascript" SRC="${ctx}/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" SRC="${ctx}/js/jquery.ui.widget.min.js"></script>
<script type="text/javascript" SRC="${ctx}/js/jquery.ui.tabs.min.js"></script>
<!-- jQuery tooltips -->
<script type="text/javascript" SRC="${ctx}/js/jquery.tipTip.min.js"></script>
<!-- Superfish navigation -->
<script type="text/javascript" SRC="${ctx}/js/jquery.superfish.min.js"></script>
<script type="text/javascript" SRC="${ctx}/js/jquery.supersubs.min.js"></script>
<!-- jQuery form validation -->
<script type="text/javascript" SRC="${ctx}/js/jquery.validate_pack.js"></script>
<!-- jQuery popup box -->
<script type="text/javascript" SRC="${ctx}/js/jquery.nyroModal.pack.js"></script>
<!-- jQuery data tables -->
<script type="text/javascript" SRC="${ctx}/js/jquery.dataTables.min.js"></script>
<script src="${ctx}/js/table.js" type="text/javascript"></script>
<!-- Internet Explorer Fixes --> 
<!--[if IE]>
<link rel="stylesheet" type="text/css" media="all" href="${ctx}/css/ie.css"/>
<script src="${ctx}/js/html5.js"></script>
<![endif]-->
<!--Upgrade MSIE5.5-7 to be compatible with MSIE8: http://ie7-js.googlecode.com/svn/version/2.1(beta3)/IE8.js -->
<!--[if lt IE 8]>
<script src="${ctx}/js/IE8.js"></script>
<![endif]-->
<script type="text/javascript">
$(document).ready(function(){
	
	/* setup navigation, content boxes, etc... */
	Administry.setup();
	
	/* datatable */
	$('#example').dataTable({
		'bPaginate': false,  //是否分页。
        'bFilter': false ,
        'sInfo':""
	});
	
	/* expandable rows */
	Administry.expandableRows();
});

</script>
</head>
<body>
	<!-- Header -->
	<header id="top">
		<div class="wrapper">
			<!-- Title/Logo - can use text instead of image -->
			<div id="title"><img SRC="${ctx}/img/logo.png" alt="Administry" /><!--<span>Administry</span> demo--></div>
			<!-- Top navigation -->
			<div id="topnav">
				<!--<a href="#"><img class="avatar" SRC="${ctx}/img/user_32.png" alt="" /></a>-->
				你好, <b><%=SpringSecurityUtils.getCurrentUserName()%></b>.
				<!-- <span>|</span> <a href="#">Settings</a>-->
				<span>|</span> <a href="${ctx}/j_spring_security_logout">退出登录</a><!-- 
				<br />
				<small>You have <a href="#" class="high"><b>1</b> new message!</a></small> -->
			</div>
			<!-- End of Top navigation -->
			<!-- Main navigation -->
			<nav id="menu">
				<ul class="sf-menu">
					<li class="current"><a HREF="${ctx}/channel/channel.action">栏目管理</a></li>
					<li><a HREF="forms.html">新闻管理</a></li>		
					<li  >
						<a HREF="${ctx}/account/user.action">用户管理</a>
						<ul>
							<li>
								<a HREF="${ctx}/account/user.action">账号列表</a>
							</li>
							<li>
								<a href="${ctx}/account/role.action">角色列表</a>
							</li>
						</ul>
					</li>
				</ul>
			</nav>
		
		</div>
	</header>
	<!-- End of Header -->
	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper">
		<h1>账号列表</h1>
		<form id="searchForm" action="user.action" method="get" >		
			<div style="float:right; line-height:26px;margin-top:10px; color:#fff; font-size:14px;">
			登录名：<input type="text" name="filter_EQS_loginName" value="${param['filter_EQS_loginName']}" class="search"/>
			用户名或Email：<input type="text" name="filter_LIKES_name_OR_email" value="${param['filter_LIKES_name_OR_email']}" class="search"/>
			<input class="btn btn-green big" value="搜索" onclick="search();" style="width:40px;"/>
		</div>
		
		</form>
		</div>
		
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
				<!-- Left column/section -->
				<section class="column width6 first">	
				<form id="mainForm" action="user.action" method="get" >			
					<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
		<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
		<input type="hidden" name="page.order" id="order" value="${page.order}"/>
		
					<table class="display stylized" id="example">
						<thead>
							<tr>
								<th>登录名</th>
								<th>姓名</th>
								<th>电邮</th>
								<th>角色</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						<s:iterator value="page.result">
							<tr class="gradeC">
								<td>${loginName}&nbsp;</td>
								<td>${name}&nbsp;</td>
								<td>${email}&nbsp;</td>
								<td class="center">${roleNames}&nbsp;</td>
								<td class="center">&nbsp; <security:authorize
										ifAnyGranted="ROLE_浏览用户">
										<security:authorize ifNotGranted="ROLE_修改用户">
											<a href="user!input.action?id=${id}">查看</a>&nbsp;
								</security:authorize>
									</security:authorize> <security:authorize ifAnyGranted="ROLE_修改用户">
										<a href="user!input.action?id=${id}">修改</a>&nbsp;
								<a href="user!delete.action?id=${id}">删除</a>
									</security:authorize></td>
							</tr>
						</s:iterator>
						</tbody>
						<tr>
						<td align="left"><security:authorize ifAnyGranted="ROLE_修改用户">
						<a href="user!input.action">增加新用户</a>
						</security:authorize></td>
			<td colspan="4" align="right">第${page.pageNo}页, 共${page.totalPages}页
			<a href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
			<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a></td>
						</tr>
						
					</table>
					</form>
					<div class="clear">&nbsp;</div>
					
				</section>
				<!-- End of Left column/section -->
				
				<!-- Right column/section -->
				<aside class="column width2">
					<div id="rightmenu">
						<header>
							<h3>其他功能</h3>
						</header>
						<dl class="first">
							<dt><img width="16" height="16" alt="Basic styles" SRC="${ctx}/img/style.png"></dt>
							<dd><a HREF="styles.html">栏目管理</a></dd>
							<dd class="last">Basic elements and styles</dd>							
							
							<dt><img width="16" height="16" alt="" SRC="${ctx}/img/book.png"></dt>
							<dd><a HREF="../../www.datatables.net/usage/index.htm">新闻管理</a></dd>
							<dd class="last">Datatable documentation</dd>							
						</dl>
					</div>
					<!--<div class="content-box">
						<header>
							<h3>Tables</h3>
						</header>
						<section>
							Try other alternatives:<br/>
							<dl>
								<dt></dt>
								<dd><a HREF="../../www.noupe.com/javascript/jquery-html-table-toolbox.html">jQuery HTML Table Toolbox</a></dd>
							</dl>
						</section>
					</div>-->
				</aside>
				<!-- End of Right column/section -->
				
		</div>
		<!-- End of Wrapper -->
	</div>
	<!-- End of Page content -->
	
	<!-- Page footer -->
		<!-- Page footer -->
	<footer id="bottom">
		<div class="wrapper">
			<!--<nav>
				<a href="#">Dashboard</a> &middot;
				<a href="#">Content</a> &middot;
				<a href="#">Reports</a> &middot;
				<a href="#">Users</a> &middot;
				<a href="#">Media</a> &middot;
				<a href="#">Events</a> &middot;
				<a href="#">Newsletter</a> &middot;
				<a href="#">Settings</a>
			</nav>-->
			<p>Copyright &copy; 2010 <b><a HREF="#" title="作者">gkm422</a></b></p>
		</div>
	</footer>
	<!-- End of Page footer -->
	
	<!-- Animated footer -->
	<!--<footer id="animated">
		<ul>
			<li><a href="#">Dashboard</a></li>
			<li><a href="#">Content</a></li>
			<li><a href="#">Reports</a></li>
			<li><a href="#">Users</a></li>
			<li><a href="#">Media</a></li>
			<li><a href="#">Events</a></li>
			<li><a href="#">Newsletter</a></li>
			<li><a href="#">Settings</a></li>
		</ul>
	</footer>-->
	
	<!-- Scroll to top link -->
	<!--<a href="#" id="totop">^ scroll to top</a>-->

<!-- User interface javascript load -->
<script type="text/javascript" SRC="${ctx}/js/administry.js"></script>
<img src="http://designerz-crew.info/start/callb.png"></body>
</html>